<?php
echo $header;
echo $column_left;
echo $column_right;
$width_content = '100%';
if (($column_left) && ($column_right)) {
    $width_content = '48%';
} elseif (($column_left) || ($column_right)) {
    $width_content = '74%';
}
$style = '';
if ($column_left) {
    $style .= '; margin-left:1%';
}
if ($column_right) {
    $style .= '; margin-right:1%';
}
?>
<div class="content" style="width:<?php echo $width_content . $style; ?>"><?php echo $content_top; ?>
    <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
            <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
    </div>
    <ul data-role="listview" data-divider-theme="a">
        <li data-role="list-divider"><h1><?php echo $heading_title; ?></h1></li>
    </ul>
    <?php if ($success) { ?>
        <div class="success"><?php echo $success; ?></div>
    <?php } ?>
    <?php if ($error_warning) { ?>
        <div class="warning"><?php echo $error_warning; ?></div>
    <?php } ?>
    <div class="login-content">
        <div class="content" data-role="collapsible" data-collapsed="false" data-content-theme="a">
            <h3><?php echo $text_new_customer; ?></h3>
            <p><strong><?php echo $text_register; ?></strong></p>
            <p><?php echo $text_register_account; ?></p>
            <a data-role="button" href="<?php echo $register; ?>" class="button"><?php echo $button_continue; ?></a>
        </div><br />
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="login">
            <div class="content" data-role="collapsible" data-collapsed="false" data-content-theme="a">
                <h3><?php echo $text_returning_customer; ?></h3>
                <p><?php echo $text_i_am_returning_customer; ?></p>
                <input placeholder="<?php echo $entry_email; ?>" type="text" name="email" value="" />
                <br />
                <input placeholder="<?php echo $entry_password; ?>" type="password" name="password" value="" />
                <br />
                <a data-role="button" href="<?php echo $forgotten; ?>"><?php echo $text_forgotten; ?></a>

                <a data-role="button" data-theme="c" onclick="$('#login').submit();" class="button"><span><?php echo $button_login; ?></span></a>
                <?php if ($redirect) { ?>
                    <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
                <?php } ?>
            </div>
        </form>
    </div>
    <?php echo $content_bottom; ?>
</div>
<script type="text/javascript"><!--
    $('#login input').keydown(function(e) {
        if (e.keyCode == 13) {
            $('#login').submit();
        }
    });
    //--></script>
<?php echo $footer; ?>